﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Diploma.Models.SubOrderPractice>>" %>
<div class="RefreshIcon" onclick=" LoadSubOrderList(); " />
<div style="clear: both;" />
<%
    if (Model.Count() == 0)
    {%>
Нет под приказов.
<%
    }
    else
    {%>
<table>
    <tr>
        <th>
        </th>
        <th>
            Дата создания
        </th>
        <th>
            Последнее обновление
        </th>
        <th>
            Статус
        </th>
    </tr>
    <%
        foreach (SubOrderPractice item in Model)
        {%>
    <tr>
        <td>
            <a href="<%:Url.RouteUrl("Default", new {controller = "SubOrderPractice", action = "Room", subOrderId = item.Id})%>">
                <div class="MoreIcon" />
            </a>
        </td>
        <td>
            <%:String.Format("{0:g}", item.CreateDate)%>
        </td>
        <td>
            <%:String.Format("{0:g}", item.UpdateDate)%>
        </td>
        <td>
            <%
            if (item.StatusId.HasValue)
            {%>
            <%:DataManager.Instance.OrderStatusRepository.GetStatus(item.StatusId.Value).DisplayName%>
            <%
            }%>
        </td>
    </tr>
    <%
        }%>
</table>
<%
    }%>